#include <iostream>
#include <string>
using namespace std;

int main() {
    int a;
    string ret;
    cin >> a;
    int count = 0;
    while (a) {

        if (count == 3) {
            count = 0;
            ret = ',' + ret;
        }
        ret  = to_string(a % 10) + ret;
        a /= 10;
        count ++;
    }

    cout << ret << endl;
}
// 64 位输出请用 printf("%lld")